home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / Controls.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  20.5 KB  |  685 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Controls.a
  3. ;
  4. ;    Contains:    Control Manager interfaces
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__CONTROLS__') = 'UNDEFINED' THEN
  21. __CONTROLS__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  30.     include 'Quickdraw.a'
  31.     ENDIF
  32. ;        include 'MixedMode.a'                                        ;
  33. ;        include 'QuickdrawText.a'                                    ;
  34.  
  35.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  36.     include 'Menus.a'
  37.     ENDIF
  38. ;        include 'Memory.a'                                            ;
  39.     IF &TYPE('STRICT_CONTROLS') = 'UNDEFINED' THEN
  40.     STRICT_CONTROLS: SET 0
  41.     ENDIF
  42. ;_________________________________________________________________________________________________________
  43. ;
  44. ; • CONTROL DEFINITION ID'S
  45. ;
  46. ;_________________________________________________________________________________________________________
  47. ;
  48. ; Standard System 7 procID's for use only with NewControl()
  49. ;
  50.  
  51. pushButProc                        EQU        0
  52. checkBoxProc                    EQU        1
  53. radioButProc                    EQU        2
  54. scrollBarProc                    EQU        16
  55. popupMenuProc                    EQU        1008
  56.  
  57. kControlUsesOwningWindowsFontVariant EQU        1 << 3            ; Control uses owning windows font to display text
  58.  
  59. ;_________________________________________________________________________________________________________
  60. ;
  61. ; • CONTROL PART CODES
  62. ;
  63. ;_________________________________________________________________________________________________________
  64. ; typedef SInt16             ControlPartCode
  65.  
  66. kControlNoPart                    EQU        0
  67. kControlLabelPart                EQU        1
  68. kControlMenuPart                EQU        2
  69. kControlTrianglePart            EQU        4
  70. kControlButtonPart                EQU        10
  71. kControlCheckBoxPart            EQU        11
  72. kControlRadioButtonPart            EQU        11
  73. kControlUpButtonPart            EQU        20
  74. kControlDownButtonPart            EQU        21
  75. kControlPageUpPart                EQU        22
  76. kControlPageDownPart            EQU        23
  77. kControlIndicatorPart            EQU        129
  78. kControlDisabledPart            EQU        254
  79. kControlInactivePart            EQU        255
  80.  
  81. ;_________________________________________________________________________________________________________
  82. ;
  83. ; • CHECK BOX VALUES
  84. ;
  85. ;_________________________________________________________________________________________________________
  86. kControlCheckboxUncheckedValue    EQU        0
  87. kControlCheckboxCheckedValue    EQU        1
  88. kControlCheckboxMixedValue        EQU        2
  89.  
  90. ;_________________________________________________________________________________________________________
  91. ;
  92. ; • RADIO BUTTON VALUES
  93. ;
  94. ;_________________________________________________________________________________________________________
  95. kControlRadioButtonUncheckedValue EQU        0
  96. kControlRadioButtonCheckedValue    EQU        1
  97. kControlRadioButtonMixedValue    EQU        2
  98.  
  99. ;_________________________________________________________________________________________________________
  100. ; • CONTROL POP-UP MENU CONSTANTS
  101. ;
  102. ;_________________________________________________________________________________________________________
  103. ;
  104. ; Variant codes for the System 7 pop-up menu
  105. ;
  106. popupFixedWidth                    EQU        1 << 0
  107. popupVariableWidth                EQU        1 << 1
  108. popupUseAddResMenu                EQU        1 << 2
  109. popupUseWFont                    EQU        1 << 3
  110.  
  111. ;
  112. ; Menu label styles for the System 7 pop-up menu 
  113. ;
  114. popupTitleBold                    EQU        1 << 8
  115. popupTitleItalic                EQU        1 << 9
  116. popupTitleUnderline                EQU        1 << 10
  117. popupTitleOutline                EQU        1 << 11
  118. popupTitleShadow                EQU        1 << 12
  119. popupTitleCondense                EQU        1 << 13
  120. popupTitleExtend                EQU        1 << 14
  121. popupTitleNoStyle                EQU        1 << 15
  122.  
  123. ;
  124. ; Menu label justifications for the System 7 pop-up menu
  125. ;
  126. popupTitleLeftJust                EQU        $00000000
  127. popupTitleCenterJust            EQU        $00000001
  128. popupTitleRightJust                EQU        $000000FF
  129.  
  130. ;_________________________________________________________________________________________________________
  131. ;
  132. ; • CONTROL DRAGGRAYRGN CONSTANTS
  133. ;
  134. ;   For DragGrayRgnUPP used in TrackControl() 
  135. ;
  136. ;_________________________________________________________________________________________________________
  137. noConstraint                    EQU        kNoConstraint
  138. hAxisOnly                        EQU        1
  139. vAxisOnly                        EQU        2
  140.  
  141. ;_________________________________________________________________________________________________________
  142. ;
  143. ; • CONTROL COLOR TABLE PART CODES
  144. ;
  145. ;_________________________________________________________________________________________________________
  146. cFrameColor                        EQU        0
  147. cBodyColor                        EQU        1
  148. cTextColor                        EQU        2
  149. cThumbColor                        EQU        3
  150.  
  151. ;_________________________________________________________________________________________________________
  152. ;
  153. ; • CONTROL TYPE DECLARATIONS
  154. ;
  155. ;_________________________________________________________________________________________________________
  156. ;
  157. ; Define ControlRef and ControlHandle
  158. ;
  159.     IF STRICT_CONTROLS  THEN
  160. ; typedef ControlRef         ControlHandle
  161.     ELSE
  162. ; typedef struct ControlRecord  ControlRecord, *ControlPtr, **ControlHandle
  163. ; typedef ControlHandle     ControlRef
  164.     ENDIF
  165. ;_________________________________________________________________________________________________________
  166. ;
  167. ; • CONTROL ACTIONPROC POINTER
  168. ;
  169. ;_________________________________________________________________________________________________________
  170. ;_________________________________________________________________________________________________________
  171. ;
  172. ; • CONTROL COLOR TABLE STRUCTURE
  173. ;
  174. ;_________________________________________________________________________________________________________
  175. CtlCTab                 RECORD    0
  176. ccSeed                     ds.l   1        ; offset: $0 (0)
  177. ccRider                     ds.w   1        ; offset: $4 (4)
  178. ctSize                     ds.w   1        ; offset: $6 (6)
  179. ctTable                     ds.b   4 * ColorSpec.sizeof ; offset: $8 (8)
  180. sizeof                     EQU *            ; size:   $28 (40)
  181.                         ENDR
  182.  
  183. ; typedef struct CtlCTab     CtlCTab
  184. ; typedef CtlCTab             *CCTabPtr, **CCTabHandle
  185.     IF ¬ STRICT_CONTROLS  THEN
  186. ;_________________________________________________________________________________________________________
  187. ;
  188. ; • CONTROL RECORD STRUCTURE
  189. ;
  190. ;_________________________________________________________________________________________________________
  191. ControlRecord             RECORD    0
  192. nextControl                 ds.l   1        ; offset: $0 (0)
  193. contrlOwner                 ds.l   1        ; offset: $4 (4)
  194. contrlRect                 ds     Rect    ; offset: $8 (8)
  195. contrlVis                 ds.b   1        ; offset: $10 (16)
  196. contrlHilite             ds.b   1        ; offset: $11 (17)
  197. contrlValue                 ds.w   1        ; offset: $12 (18)
  198. contrlMin                 ds.w   1        ; offset: $14 (20)
  199. contrlMax                 ds.w   1        ; offset: $16 (22)
  200. contrlDefProc             ds.l   1        ; offset: $18 (24)
  201. contrlData                 ds.l   1        ; offset: $1C (28)
  202. contrlAction             ds.l   1        ; offset: $20 (32)
  203. contrlRfCon                 ds.l   1        ; offset: $24 (36)
  204. contrlTitle                 ds.l   64        ; offset: $28 (40)
  205. sizeof                     EQU *            ; size:   $128 (296)
  206.                         ENDR
  207.  
  208. ;_________________________________________________________________________________________________________
  209. ;
  210. ; • AUXILLARY CONTROL RECORD STRUCTURE
  211. ;
  212. ;_________________________________________________________________________________________________________
  213. AuxCtlRec                 RECORD    0
  214. acNext                     ds.l   1        ; offset: $0 (0)
  215. acOwner                     ds.l   1        ; offset: $4 (4)
  216. acCTable                 ds.l   1        ; offset: $8 (8)
  217. acFlags                     ds.w   1        ; offset: $C (12)
  218. acReserved                 ds.l   1        ; offset: $E (14)
  219. acRefCon                 ds.l   1        ; offset: $12 (18)
  220. sizeof                     EQU *            ; size:   $16 (22)
  221.                         ENDR
  222.  
  223. ; typedef struct AuxCtlRec     AuxCtlRec
  224. ; typedef AuxCtlRec         *AuxCtlPtr, **AuxCtlHandle
  225. ;_________________________________________________________________________________________________________
  226. ;
  227. ; • POP-UP MENU PRIVATE DATA STRUCTURE
  228. ;
  229. ;_________________________________________________________________________________________________________
  230. PopupPrivateData         RECORD    0
  231. mHandle                     ds.l   1        ; offset: $0 (0)
  232. mID                         ds.w   1        ; offset: $4 (4)
  233. sizeof                     EQU *            ; size:   $6 (6)
  234.                         ENDR
  235.  
  236. ; typedef struct PopupPrivateData  PopupPrivateData
  237. ; typedef PopupPrivateData     *PopupPrivateDataPtr, **PopupPrivateDataHandle
  238.     ENDIF
  239. ;_________________________________________________________________________________________________________
  240. ;    
  241. ; • CONTROL CREATION / DELETION API'S
  242. ;
  243. ;_________________________________________________________________________________________________________
  244. ;
  245. ; pascal ControlRef NewControl(WindowRef theWindow, const Rect *boundsRect, ConstStr255Param title, Boolean visible, SInt16 value, SInt16 min, SInt16 max, SInt16 procID, SInt32 refCon)
  246. ;
  247.     IF ¬ GENERATINGCFM THEN
  248.         _NewControl:    OPWORD    $A954
  249.     ELSE
  250.         IMPORT_CFM_FUNCTION    NewControl
  251.     ENDIF
  252.  
  253. ;
  254. ; pascal ControlRef GetNewControl(SInt16 controlID, WindowRef owner)
  255. ;
  256.     IF ¬ GENERATINGCFM THEN
  257.         _GetNewControl:    OPWORD    $A9BE
  258.     ELSE
  259.         IMPORT_CFM_FUNCTION    GetNewControl
  260.     ENDIF
  261.  
  262. ;
  263. ; pascal void DisposeControl(ControlRef theControl)
  264. ;
  265.     IF ¬ GENERATINGCFM THEN
  266.         _DisposeControl:    OPWORD    $A955
  267.     ELSE
  268.         IMPORT_CFM_FUNCTION    DisposeControl
  269.     ENDIF
  270.  
  271. ;
  272. ; pascal void KillControls(WindowRef theWindow)
  273. ;
  274.     IF ¬ GENERATINGCFM THEN
  275.         _KillControls:    OPWORD    $A956
  276.     ELSE
  277.         IMPORT_CFM_FUNCTION    KillControls
  278.     ENDIF
  279.  
  280. ;_________________________________________________________________________________________________________
  281. ;    
  282. ; • CONTROL SHOWING/HIDING API'S
  283. ;
  284. ;_________________________________________________________________________________________________________
  285. ;
  286. ; pascal void ShowControl(ControlRef theControl)
  287. ;
  288.     IF ¬ GENERATINGCFM THEN
  289.         _ShowControl:    OPWORD    $A957
  290.     ELSE
  291.         IMPORT_CFM_FUNCTION    ShowControl
  292.     ENDIF
  293.  
  294. ;
  295. ; pascal void HideControl(ControlRef theControl)
  296. ;
  297.     IF ¬ GENERATINGCFM THEN
  298.         _HideControl:    OPWORD    $A958
  299.     ELSE
  300.         IMPORT_CFM_FUNCTION    HideControl
  301.     ENDIF
  302.  
  303. ;_________________________________________________________________________________________________________
  304. ;    
  305. ; • CONTROL DRAWING API'S
  306. ;
  307. ;_________________________________________________________________________________________________________
  308. ;
  309. ; pascal void DrawControls(WindowRef theWindow)
  310. ;
  311.     IF ¬ GENERATINGCFM THEN
  312.         _DrawControls:    OPWORD    $A969
  313.     ELSE
  314.         IMPORT_CFM_FUNCTION    DrawControls
  315.     ENDIF
  316.  
  317. ;
  318. ; pascal void Draw1Control(ControlRef theControl)
  319. ;
  320.     IF ¬ GENERATINGCFM THEN
  321.         _Draw1Control:    OPWORD    $A96D
  322.     ELSE
  323.         IMPORT_CFM_FUNCTION    Draw1Control
  324.     ENDIF
  325.  
  326. ;
  327. ; pascal void UpdateControls(WindowRef theWindow, RgnHandle updateRegion)
  328. ;
  329.     IF ¬ GENERATINGCFM THEN
  330.         _UpdateControls:    OPWORD    $A953
  331.     ELSE
  332.         IMPORT_CFM_FUNCTION    UpdateControls
  333.     ENDIF
  334.  
  335. ;_________________________________________________________________________________________________________
  336. ;    
  337. ; • CONTROL HIGHLIGHT API'S
  338. ;
  339. ;_________________________________________________________________________________________________________
  340. ;
  341. ; pascal void HiliteControl(ControlRef theControl, ControlPartCode hiliteState)
  342. ;
  343.     IF ¬ GENERATINGCFM THEN
  344.         _HiliteControl:    OPWORD    $A95D
  345.     ELSE
  346.         IMPORT_CFM_FUNCTION    HiliteControl
  347.     ENDIF
  348.  
  349. ;
  350. ; pascal ControlPartCode TrackControl(ControlRef theControl, Point thePoint, ControlActionUPP actionProc)
  351. ;
  352.     IF ¬ GENERATINGCFM THEN
  353.         _TrackControl:    OPWORD    $A968
  354.     ELSE
  355.         IMPORT_CFM_FUNCTION    TrackControl
  356.     ENDIF
  357.  
  358. ;
  359. ; pascal void DragControl(ControlRef theControl, Point startPoint, const Rect *limitRect, const Rect *slopRect, DragConstraint axis)
  360. ;
  361.     IF ¬ GENERATINGCFM THEN
  362.         _DragControl:    OPWORD    $A967
  363.     ELSE
  364.         IMPORT_CFM_FUNCTION    DragControl
  365.     ENDIF
  366.  
  367. ;
  368. ; pascal ControlPartCode TestControl(ControlRef theControl, Point thePoint)
  369. ;
  370.     IF ¬ GENERATINGCFM THEN
  371.         _TestControl:    OPWORD    $A966
  372.     ELSE
  373.         IMPORT_CFM_FUNCTION    TestControl
  374.     ENDIF
  375.  
  376. ;
  377. ; pascal ControlPartCode FindControl(Point thePoint, WindowRef theWindow, ControlRef *theControl)
  378. ;
  379.     IF ¬ GENERATINGCFM THEN
  380.         _FindControl:    OPWORD    $A96C
  381.     ELSE
  382.         IMPORT_CFM_FUNCTION    FindControl
  383.     ENDIF
  384.  
  385. ;_________________________________________________________________________________________________________
  386. ;    
  387. ; • CONTROL MOVING/SIZING API'S
  388. ;
  389. ;_________________________________________________________________________________________________________
  390. ;
  391. ; pascal void MoveControl(ControlRef theControl, SInt16 h, SInt16 v)
  392. ;
  393.     IF ¬ GENERATINGCFM THEN
  394.         _MoveControl:    OPWORD    $A959
  395.     ELSE
  396.         IMPORT_CFM_FUNCTION    MoveControl
  397.     ENDIF
  398.  
  399. ;
  400. ; pascal void SizeControl(ControlRef theControl, SInt16 w, SInt16 h)
  401. ;
  402.     IF ¬ GENERATINGCFM THEN
  403.         _SizeControl:    OPWORD    $A95C
  404.     ELSE
  405.         IMPORT_CFM_FUNCTION    SizeControl
  406.     ENDIF
  407.  
  408. ;_________________________________________________________________________________________________________
  409. ;    
  410. ; • CONTROL TITLE API'S
  411. ;
  412. ;_________________________________________________________________________________________________________
  413. ;
  414. ; pascal void SetControlTitle(ControlRef theControl, ConstStr255Param title)
  415. ;
  416.     IF ¬ GENERATINGCFM THEN
  417.         _SetControlTitle:    OPWORD    $A95F
  418.     ELSE
  419.         IMPORT_CFM_FUNCTION    SetControlTitle
  420.     ENDIF
  421.  
  422. ;
  423. ; pascal void GetControlTitle(ControlRef theControl, Str255 title)
  424. ;
  425.     IF ¬ GENERATINGCFM THEN
  426.         _GetControlTitle:    OPWORD    $A95E
  427.     ELSE
  428.         IMPORT_CFM_FUNCTION    GetControlTitle
  429.     ENDIF
  430.  
  431. ;_________________________________________________________________________________________________________
  432. ;    
  433. ; • CONTROL VALUE, MIMIMUM, AND MAXIMUM API'S
  434. ;
  435. ;_________________________________________________________________________________________________________
  436. ;
  437. ; pascal SInt16 GetControlValue(ControlRef theControl)
  438. ;
  439.     IF ¬ GENERATINGCFM THEN
  440.         _GetControlValue:    OPWORD    $A960
  441.     ELSE
  442.         IMPORT_CFM_FUNCTION    GetControlValue
  443.     ENDIF
  444.  
  445. ;
  446. ; pascal void SetControlValue(ControlRef theControl, SInt16 newValue)
  447. ;
  448.     IF ¬ GENERATINGCFM THEN
  449.         _SetControlValue:    OPWORD    $A963
  450.     ELSE
  451.         IMPORT_CFM_FUNCTION    SetControlValue
  452.     ENDIF
  453.  
  454. ;
  455. ; pascal SInt16 GetControlMinimum(ControlRef theControl)
  456. ;
  457.     IF ¬ GENERATINGCFM THEN
  458.         _GetControlMinimum:    OPWORD    $A961
  459.     ELSE
  460.         IMPORT_CFM_FUNCTION    GetControlMinimum
  461.     ENDIF
  462.  
  463. ;
  464. ; pascal void SetControlMinimum(ControlRef theControl, SInt16 newMinimum)
  465. ;
  466.     IF ¬ GENERATINGCFM THEN
  467.         _SetControlMinimum:    OPWORD    $A964
  468.     ELSE
  469.         IMPORT_CFM_FUNCTION    SetControlMinimum
  470.     ENDIF
  471.  
  472. ;
  473. ; pascal SInt16 GetControlMaximum(ControlRef theControl)
  474. ;
  475.     IF ¬ GENERATINGCFM THEN
  476.         _GetControlMaximum:    OPWORD    $A962
  477.     ELSE
  478.         IMPORT_CFM_FUNCTION    GetControlMaximum
  479.     ENDIF
  480.  
  481. ;
  482. ; pascal void SetControlMaximum(ControlRef theControl, SInt16 newMaximum)
  483. ;
  484.     IF ¬ GENERATINGCFM THEN
  485.         _SetControlMaximum:    OPWORD    $A965
  486.     ELSE
  487.         IMPORT_CFM_FUNCTION    SetControlMaximum
  488.     ENDIF
  489.  
  490. ;_________________________________________________________________________________________________________
  491. ;    
  492. ; • CONTROL VARIANT AND WINDOW INFORMATION API'S
  493. ;
  494. ;_________________________________________________________________________________________________________
  495. ;
  496. ; pascal SInt16 GetControlVariant(ControlRef theControl)
  497. ;
  498.     IF ¬ GENERATINGCFM THEN
  499.         _GetControlVariant:    OPWORD    $A809
  500.     ELSE
  501.         IMPORT_CFM_FUNCTION    GetControlVariant
  502.     ENDIF
  503.  
  504. ;_________________________________________________________________________________________________________
  505. ;    
  506. ; • CONTROL ACTION PROC API'S
  507. ;
  508. ;_________________________________________________________________________________________________________
  509. ;
  510. ; pascal void SetControlAction(ControlRef theControl, ControlActionUPP actionProc)
  511. ;
  512.     IF ¬ GENERATINGCFM THEN
  513.         _SetControlAction:    OPWORD    $A96B
  514.     ELSE
  515.         IMPORT_CFM_FUNCTION    SetControlAction
  516.     ENDIF
  517.  
  518. ;
  519. ; pascal ControlActionUPP GetControlAction(ControlRef theControl)
  520. ;
  521.     IF ¬ GENERATINGCFM THEN
  522.         _GetControlAction:    OPWORD    $A96A
  523.     ELSE
  524.         IMPORT_CFM_FUNCTION    GetControlAction
  525.     ENDIF
  526.  
  527. ;_________________________________________________________________________________________________________
  528. ;    
  529. ; • CONTROL ACCESSOR API'S
  530. ;
  531. ;_________________________________________________________________________________________________________
  532. ;
  533. ; pascal void SetControlReference(ControlRef theControl, SInt32 data)
  534. ;
  535.     IF ¬ GENERATINGCFM THEN
  536.         _SetControlReference:    OPWORD    $A95B
  537.     ELSE
  538.         IMPORT_CFM_FUNCTION    SetControlReference
  539.     ENDIF
  540.  
  541. ;
  542. ; pascal SInt32 GetControlReference(ControlRef theControl)
  543. ;
  544.     IF ¬ GENERATINGCFM THEN
  545.         _GetControlReference:    OPWORD    $A95A
  546.     ELSE
  547.         IMPORT_CFM_FUNCTION    GetControlReference
  548.     ENDIF
  549.  
  550. ;_________________________________________________________________________________________________________
  551. ;    
  552. ; • PREPARE FOR THE COPLAND MACINTOSH OS NOW
  553. ;
  554. ;     The window control list is moving to the Control Manager.  In addition, to prepare for Copland, you
  555. ;     want to try to begin compiling with STRICT_CONTROLS and STRICT_WINDOWS turned on.  This makes the
  556. ;     ControlRecord and WindowRecord opaque and you will be unable to access the fields directly.  If you
  557. ;     need information from one of these fields, use one of the provided accessor functions.  For now,
  558. ;     the new accessor functions are provided as macros, but in Copland they will become true API entry
  559. ;      points.
  560. ;
  561. ;     So what does this all mean?  Replace all references to the window control list in the WindowRecord
  562. ;     with the macro below.  Then in the future when Copland interfaces are available, no source changes
  563. ;     will be required and the macro will automatically replaced with a call to the real API.
  564. ;
  565. ;     Please direct all questions regarding usuage to the TOOLBOX AppleLink address.
  566. ;
  567. ;     <<<< See Windows.h for more information >>>>>
  568. ;
  569. ;_________________________________________________________________________________________________________
  570.     IF ¬ STRICT_CONTROLS  THEN
  571. ;
  572. ; pascal Boolean GetAuxiliaryControlRecord(ControlRef theControl, AuxCtlHandle *acHndl)
  573. ;
  574.     IF ¬ GENERATINGCFM THEN
  575.         _GetAuxiliaryControlRecord:    OPWORD    $AA44
  576.     ELSE
  577.         IMPORT_CFM_FUNCTION    GetAuxiliaryControlRecord
  578.     ENDIF
  579.  
  580.     ENDIF
  581. ;
  582. ; pascal void SetControlColor(ControlRef theControl, CCTabHandle newColorTable)
  583. ;
  584.     IF ¬ GENERATINGCFM THEN
  585.         _SetControlColor:    OPWORD    $AA43
  586.     ELSE
  587.         IMPORT_CFM_FUNCTION    SetControlColor
  588.     ENDIF
  589.  
  590. ;_________________________________________________________________________________________________________
  591. ;    
  592. ; • VALID 'CDEF' MESSAGES
  593. ;
  594. ;_________________________________________________________________________________________________________
  595. ; typedef SInt16             ControlDefProcMessage
  596.  
  597. drawCntl                        EQU        0
  598. testCntl                        EQU        1
  599. calcCRgns                        EQU        2
  600. initCntl                        EQU        3
  601. dispCntl                        EQU        4
  602. posCntl                            EQU        5
  603. thumbCntl                        EQU        6
  604. dragCntl                        EQU        7
  605. autoTrack                        EQU        8
  606. calcCntlRgn                        EQU        10
  607. calcThumbRgn                    EQU        11
  608. drawThumbOutline                EQU        12
  609.  
  610. ;_________________________________________________________________________________________________________
  611. ;    
  612. ; • MAIN ENTRY POINT FOR 'CDEF'
  613. ;
  614. ;_________________________________________________________________________________________________________
  615. ;_________________________________________________________________________________________________________
  616. ;    
  617. ; • CONSTANTS FOR DRAWCNTL MESSAGE PASSED IN PARAM
  618. ;
  619. ;_________________________________________________________________________________________________________
  620. kDrawControlEntireControl        EQU        0
  621. kDrawControlIndicatorOnly        EQU        129
  622.  
  623. ;_________________________________________________________________________________________________________
  624. ;    
  625. ; • CONSTANTS FOR DRAGCNTL MESSAGE PASSED IN PARAM
  626. ;
  627. ;_________________________________________________________________________________________________________
  628. kDragControlEntireControl        EQU        0
  629. kDragControlIndicator            EQU        1
  630.  
  631. ;_________________________________________________________________________________________________________
  632. ;    
  633. ; • DRAG CONSTRAINT STRUCTURE PASSED IN PARAM FOR THUMBCNTL MESSAGE (IM I-332)
  634. ;
  635. ;_________________________________________________________________________________________________________
  636. IndicatorDragConstraint RECORD    0
  637. limitRect                 ds     Rect    ; offset: $0 (0)
  638. slopRect                 ds     Rect    ; offset: $8 (8)
  639. axis                     ds.w   1        ; offset: $10 (16)
  640. sizeof                     EQU *            ; size:   $12 (18)
  641.                         ENDR
  642.  
  643. ; typedef struct IndicatorDragConstraint  IndicatorDragConstraint
  644. ; typedef IndicatorDragConstraint  *IndicatorDragConstraintPtr, **IndicatorDragConstraintHandle
  645. ;_________________________________________________________________________________________________________
  646. ;
  647. ; • OLD ROUTINE NAMES
  648. ;
  649. ;   These are provided for compatiblity with older source bases.  It is recommended to not use them since
  650. ;     they may removed from this interface file at any time.
  651. ;
  652. ;_________________________________________________________________________________________________________
  653.     IF OLDROUTINENAMES  THEN
  654.  
  655. useWFont                        EQU        8
  656.  
  657. inLabel                            EQU        1
  658. inMenu                            EQU        2
  659. inTriangle                        EQU        4
  660. inButton                        EQU        10
  661. inCheckBox                        EQU        11
  662. inUpButton                        EQU        20
  663. inDownButton                    EQU        21
  664. inPageUp                        EQU        22
  665. inPageDown                        EQU        23
  666. inThumb                            EQU        129
  667.  
  668. kNoHiliteControlPart            EQU        0
  669. kInLabelControlPart                EQU        1
  670. kInMenuControlPart                EQU        2
  671. kInTriangleControlPart            EQU        4
  672. kInButtonControlPart            EQU        10
  673. kInCheckBoxControlPart            EQU        11
  674. kInUpButtonControlPart            EQU        20
  675. kInDownButtonControlPart        EQU        21
  676. kInPageUpControlPart            EQU        22
  677. kInPageDownControlPart            EQU        23
  678. kInIndicatorControlPart            EQU        129
  679. kReservedControlPart            EQU        254
  680. kControlInactiveControlPart        EQU        255
  681.  
  682.     ENDIF
  683.     ENDIF ; __CONTROLS__
  684.